$(document).ready(function () {
	
	$("#navigation ul li.code1 .Links").parents("li").removeClass("closed").find("ul").removeClass("closed").show("blind", {percent: 100}, "normal");
	
});

function multiple_action(ctrl_name) {
	var ids = "";
	if (ctrl_name == "changecategory") {
		var category = $("#listCategory").val();
		var url = server + "/admin/list-link";
		if (category != 0) {
			url += "?c=" + category; 
		}
		window.location = url;
	} else {
		$("#example tbody tr td input[type=checkbox]").each(function (item, data) {
			if ($(this).is(':checked')) {
				ids += $(this).parents("tr").attr("id") + ",";
			}
		});
		showAjaxEffect();
		$.get(server + "/admin/update-link", {ids: ids, action: ctrl_name}, function(data) {
			hideAjaxEffect();
			location.reload();
		});
	}
}